using Com.Help.BLL;
using Com.Help.BLL.Utils;
using Com.Help.DBEntity;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;

namespace GGHAdminSite.Controllers
{
    /// <summary>
    /// 资金明细
    /// </summary>
    public class MoneydetailController : Controller
    {
        // GET: Variety
        public ActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// 查询所有信息
        /// </summary>
        /// <returns></returns>
        public ActionResult List()
        {
            int id = 0,page = 0,rows = 0;
			try{
				id = Convert.ToInt32(id);
				page = Convert.ToInt32(page);
				rows = Convert.ToInt32(rows);
			}catch{}
            return Json(MoneydetailBLL.GetList(id,page,rows));
        }

        /// <summary>
        /// 新增/修改
        /// </summary>
        /// <returns></returns>
        public ActionResult Save()
        {
int id = 0;
int uid = 0;
double money = 0;
datetime createtime = 0;
string details = Request["details"];
            try
            {
id = int.Parse(Request["id"]);
uid = int.Parse(Request["uid"]);
money = double.Parse(Request["money"]);
createtime = datetime.Parse(Request["createtime"]);
            }
            catch { }
            return Json(MoneydetailBLL.Save( id, uid, money, createtime, details));
        }
    }
}
